import { createRouter, createWebHistory } from 'vue-router'
import LayoutView from '../layout/Index.vue'
export const constantRoutes = [
  {
    name: '_home',
    path: '/',
    component: LayoutView,
    meta: {
      title: '首页',
      icon: 'book',
    },
    children: [
      {
        name: 'home',
        path: '/',
        component: import('../views/home/Index.vue'),
        meta: {
          hasAside: false,
          title: '我的',
          icon: 'book',
          affix: true, // 固定在标签栏
        },
      },
    ],
    showMenu: false, // 显示在菜单中
  },
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: constantRoutes,
})

export default router
